import StorageUtil from '../utils/storage.js';

class AuthService {
    static isLoggedIn() {
        return StorageUtil.getItem('isLoggedIn') === true;
    }

    static login(username, password) {
        if (username === 'admin' && password === 'admin') {
            StorageUtil.setItem('isLoggedIn', true);
            return true;
        }
        return false;
    }

    static logout() {
        StorageUtil.removeItem('isLoggedIn');
    }
}

export default AuthService; 